package cn.steam.bar.ctrl;

import cn.steam.bar.api.WeaponApi;
import cn.steam.bar.model.WeaponCreateModel;
import cn.steam.bar.model.WeaponVO;
import cn.steam.bar.service.WeaponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhang jintao on 2022/05/11
 **/
@RestController
public class WeaponCtrl implements WeaponApi {

    @Autowired
    WeaponService weaponService;

    @Override
    public WeaponVO getById(@RequestParam Integer id) {
        return weaponService.getById(id);
    }

    @Override
    public Boolean delete(@RequestParam Integer id) {
        return weaponService.delete(id);
    }

    @Override
    public Boolean save(@RequestBody WeaponCreateModel model) {
        return weaponService.save(model);
    }
}
